<template>
  <view class="container">
    <!-- Logo -->
    <view class="logo-section">
      <image src="/static/images/logo.png" mode="aspectFit"></image>
      <text class="app-name">DMS商城</text>
      <text class="version">v1.0.0</text>
    </view>
    
    <!-- 功能列表 -->
    <view class="menu-section">
      <view class="menu-item" @tap="copyText('400-123-4567')">
        <text>客服电话</text>
        <text class="value">400-123-4567</text>
      </view>
      <view class="menu-item" @tap="copyText('support@dms.com')">
        <text>客服邮箱</text>
        <text class="value">support@dms.com</text>
      </view>
      <view class="menu-item" @tap="goToPage('/pages/settings/agreement')">
        <text>用户协议</text>
        <text class="iconfont icon-arrow-right"></text>
      </view>
      <view class="menu-item" @tap="goToPage('/pages/settings/privacy')">
        <text>隐私政策</text>
        <text class="iconfont icon-arrow-right"></text>
      </view>
    </view>
    
    <!-- 公司信息 -->
    <view class="company-section">
      <text class="company-name">DMS科技有限公司</text>
      <text class="copyright">Copyright © 2024 All Rights Reserved</text>
    </view>
  </view>
</template>

<script>
import { showToast } from '@/utils/common'

export default {
  methods: {
    // 复制文本
    copyText(text) {
      uni.setClipboardData({
        data: text,
        success: () => {
          showToast('复制成功')
        }
      })
    },
    
    // 页面跳转
    goToPage(url) {
      uni.navigateTo({ url })
    }
  }
}
</script>

<style lang="scss">
.container {
  min-height: 100vh;
  background: #f5f5f5;
  padding: 20rpx;
}

.logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60rpx 0;
  
  image {
    width: 160rpx;
    height: 160rpx;
    margin-bottom: 20rpx;
  }
  
  .app-name {
    font-size: 36rpx;
    color: #333;
    font-weight: bold;
    margin-bottom: 10rpx;
  }
  
  .version {
    font-size: 24rpx;
    color: #999;
  }
}

.menu-section {
  background: #fff;
  border-radius: 12rpx;
  margin-top: 20rpx;
  
  .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30rpx;
    border-bottom: 1rpx solid #f5f5f5;
    
    &:last-child {
      border-bottom: none;
    }
    
    text {
      font-size: 28rpx;
      color: #333;
    }
    
    .value {
      color: #666;
    }
    
    .icon-arrow-right {
      font-size: 24rpx;
      color: #999;
    }
  }
}

.company-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40rpx 0;
  
  .company-name {
    font-size: 24rpx;
    color: #666;
    margin-bottom: 10rpx;
  }
  
  .copyright {
    font-size: 24rpx;
    color: #999;
  }
}
</style> 